﻿using System;


namespace advadev.CanOpen
{

    /// <summary>
    /// Represents a can open error register
    /// </summary>
    public class CanOpenErrorRegister
    {

        /// <summary>
        /// Initializes a new instance of the CanOpenErrorRegister class by the
        /// given parameter
        /// </summary>
        /// <param name="errorRegister">
        /// Error register
        /// </param>
        public CanOpenErrorRegister(byte errorRegister)
        {
            ErrorRegister = errorRegister;
        }


        /// <summary>
        /// Gets or sets the error register
        /// </summary>
        public byte ErrorRegister
        {
            get;
            set;
        }

        /// <summary>
        /// Gets a localized description for the error register
        /// </summary>
        public string LocalizedDescription
        {
            get
            {
                // -->> HACK: implement localized description
                return ErrorRegister.ToString();
                // <<-- HACK
            }
        }

    }

}
